/*
 * Filename Sex.java 2021年09月29日
 * Copyright © Ehome Co.Ltd. All Rgiths Reserved.
 * @author gaojun
 */
package com.ehome.poct.core.api.dto.common;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 性别
 *
 * @author muqiu
 * @since 2022/03/04 17:40
 **/
@Getter
@AllArgsConstructor
public enum Sex {
    MALE(1, "男性"),
    FEMALE(2, "女性"),
    ;
    private final int value;
    private final String desc;

    public static Sex findByValue(int value) {
        if (1 == value) {
            return Sex.MALE;
        } else {
            return Sex.FEMALE;
        }
    }
}
